<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

	<ui:composition template="/protected/template/mainLayout.xhtml">
		<ui:define name="content">
			<div id="customer_container">
				
				<div id="customer_catagory">
					<h:outputText value="#{msg.label_main_catalog}"></h:outputText>
				</div>
				<div id="customer_form">
					<h:form id="formId">
						<rich:panel>
		
							<rich:messages globalOnly="true" ajaxRendered="true" rendered="false"></rich:messages>
		
							<h:panelGrid columns="1" width="100%">
								<h:panelGrid columns="4">
									<h:outputLabel value="#{msg.label_customer_search_title}" />
									<h:inputText value="#{customerBean.keyWord}" id="search_key_word"></h:inputText>
									<h:commandButton id="search_button_id"
										actionListener="#{customerBean.searchCustomer}"
										value="#{msg.button_search}"
										onclick="allowRedirect(); return search_customer(${customerBean.addTab},'${info.msg_make_sure_not_save}');"></h:commandButton>
									<h:commandButton id="create_button_id" actionListener="#{customerBean.toAddCustomer}" onclick="allowRedirect();"
										value="#{msg.button_add}" disabled="#{customerBean.addTab}"></h:commandButton>
								</h:panelGrid>
		
							</h:panelGrid>
		
							<div class="line"></div>
		
							<h:panelGroup id="sumTabId" rendered="#{customerBean.sumTab}">
		
								<rich:dataScroller for="customerTable" maxPages="5"
									rendered="#{customerBean.customerVoList.rowCount>customerBean.tableRows}" />
		
								<rich:dataTable width="700" var="customerVo"
									rows="#{customerBean.tableRows}" id="customerTable" iterationStatusVar="sta"
									rowSelection="single" value="#{customerBean.customerVoList}">
									<f:facet name="header">
										<rich:columnGroup>
											<rich:column colspan="1">
												<h:outputText value="#{msg.label_search_customer_id}" />
											</rich:column>
											<rich:column>
												<h:outputText value="#{msg.label_search_customer_name_en}" />
											</rich:column>
											<rich:column>
												<h:outputText value="#{msg.label_search_customer_name_simp}" />
											</rich:column>
											<rich:column>
												<h:outputText value="#{msg.label_search_customer_name_chi}" />
											</rich:column>
											<rich:column>
												<h:outputText value="#{msg.label_search_customer_birthday}" />
											</rich:column>
											<rich:column>
												<h:outputText value="#{msg.label_search_customer_phone}" />
											</rich:column>
											<rich:column>
												<h:outputText value="#{msg.label_search_customer_email}" />
											</rich:column>
										</rich:columnGroup>
									</f:facet>
		
		
		
									<rich:columnGroup>
		
										<rich:column>
											<h:commandLink id="customerTableRowId#{sta.index}" 
												actionListener="#{customerBean.toEditCustomer}" onclick="allowRedirect();">
												<f:param name="custId" value="#{customerVo.custId}"></f:param>
												<h:outputText value="#{customerVo.custId}">
												</h:outputText>
											</h:commandLink>
		
										</rich:column>
		
										<rich:column>
											<h:outputText value="#{customerVo.namEng}">
											</h:outputText>
										</rich:column>
		
										<rich:column>
											<h:outputText value="#{customerVo.namZhs}">
											</h:outputText>
										</rich:column>
		
										<rich:column>
											<h:outputText value="#{customerVo.namZht}">
											</h:outputText>
										</rich:column>
		
										<rich:column>
											<h:outputText value="#{customerVo.birthday}">
											</h:outputText>
										</rich:column>
		
										<rich:column>
											<h:outputText value="#{customerVo.telNbr}">
											</h:outputText>
										</rich:column>
		
										<rich:column>
											<h:outputText value="#{customerVo.email}">
											</h:outputText>
										</rich:column>
		
									</rich:columnGroup>
								</rich:dataTable>
								<rich:dataScroller for="customerTable" maxPages="5"
									rendered="#{customerBean.customerVoList.rowCount>customerBean.tableRows}" />
		
							</h:panelGroup>
		
							<h:panelGrid columns="2" styleClass="panel-grid-default"
								rendered="#{customerBean.addTab}" id="addTabId">
								<rich:tabPanel switchType="client" id="addTabPanelId"
									activeItem="#{customerBean.activeTab}">
		
		
									<rich:tab id="customerTabInfoId" header="#{msg.label_tab_customer_info}">
		
										<h:panelGrid columns="2" cellspacing="0">
											<h:outputText value="#{msg.label_customer_appellation}"></h:outputText>
											<h:panelGroup>
												<h:selectOneRadio label="#{msg.label_customer_appellation}"
													id="titleInput" value="#{customerBean.customerVo.title}">
													<f:selectItems value="#{customerBean.saluteItems}"></f:selectItems>
												</h:selectOneRadio>
												<rich:message for="titleInput" ajaxRendered="true"></rich:message>
		
											</h:panelGroup>
		
											
											<h:outputText value="#{msg.label_customer_fr_chanl}"></h:outputText>
											<h:panelGroup>
												<h:selectOneMenu label="#{msg.label_customer_fr_chanl}"
													id="frChanlInput" value="#{customerBean.customerVo.frChanl}">
													<f:selectItem itemLabel="" itemValue=""></f:selectItem>
													<f:selectItems value="#{customerBean.frChanlItems}"></f:selectItems>
												</h:selectOneMenu>
												<rich:message for="frChanlInput" ajaxRendered="true"></rich:message>
											</h:panelGroup>
		
											<h:outputText value="#{msg.label_customer_name_en}"></h:outputText>
											<h:panelGroup>
												<h:inputText label="#{msg.label_customer_name_en}"
													id="namEngInput" value="#{customerBean.customerVo.namEng}"
													maxlength="60">
												</h:inputText>
												<rich:message for="namEngInput"></rich:message>
											</h:panelGroup>
		
											<h:outputText value="#{msg.label_customer_name_simp}"></h:outputText>
											<h:inputText value="#{customerBean.customerVo.namZhs}"
												maxlength="60"></h:inputText>
		
											<h:outputText value="#{msg.label_customer_name_chi}"></h:outputText>
											<h:inputText value="#{customerBean.customerVo.namZht}"
												maxlength="60"></h:inputText>
		
											<h:outputText value="#{msg.label_customer_birthday}"></h:outputText>
											<h:panelGroup>
												<h:selectOneMenu value="#{customerBean.customerVo.dobMonth}"
													valueChangeListener="#{customerBean.dobMonthValueChange}">
													<f:selectItems value="#{customerBean.dobMonthItems}"></f:selectItems>
													<a4j:ajax event="valueChange" render="dobDayInput" execute="@this" />
												</h:selectOneMenu>
												<h:outputText value="#{label_month}"></h:outputText>
												<h:selectOneMenu id="dobDayInput" value="#{customerBean.customerVo.dobDay}">
													<f:selectItems value="#{customerBean.dobDayItems}"></f:selectItems>
												</h:selectOneMenu>
												<h:outputText value="#{label_day}"></h:outputText>
											</h:panelGroup>
		
		
		
											<h:outputText value="#{msg.label_customer_phone}"></h:outputText>
											<h:panelGroup>
												<rich:list type="definitions" var="telephoneVo"
													iterationStatusVar="sta"
													value="#{customerBean.customerVo.customerTelephoneList}"
													id="telList" styleClass="rf-dlst-customer">
													<f:facet name="term">
														<h:panelGroup layout="block">
															<h:inputText size="6" value="#{telephoneVo.ctryCde}"
																maxlength="14" ></h:inputText>
															<h:outputLabel value=" - "></h:outputLabel>
															<h:inputText size="6" value="#{telephoneVo.areaCde}"
																maxlength="14"></h:inputText>
															<h:outputLabel value=" - "></h:outputLabel>
															<h:inputText size="20" value="#{telephoneVo.telNbr}"
																id="telNbrInput"
																onkeyup="value=value.replace(/[^0-9]/,'');value=value.replace(/^0/g, '')"
																onkeydown="checkkey2(this.value,event);value=value.replace(/^0/g, '')"
																validatorMessage="Validation Error: Invalid telephone number" maxlength="50">
																	<f:validateRegex
															pattern="([0-9])*"></f:validateRegex>
														<rich:validator />	
																</h:inputText>
															<h:outputLabel value="#{msg.label_category} " styleClass="space-left"></h:outputLabel>
															<h:selectOneMenu value="#{telephoneVo.typeCde}">
																<f:selectItem itemLabel="" itemValue=""></f:selectItem>
																<f:selectItem itemLabel="#{msg.label_contact_type_c}"
																	itemValue="C"></f:selectItem>
																<f:selectItem itemLabel="#{msg.label_contact_type_h}"
																	itemValue="H"></f:selectItem>
																<f:selectItem itemLabel="#{msg.label_contact_type_o}"
																	itemValue="O"></f:selectItem>
																<f:selectItem itemLabel="#{msg.label_contact_type_other}"
																	itemValue="M"></f:selectItem>
															</h:selectOneMenu>
															<a4j:commandButton render="telList" styleClass="space-left"
																value="#{msg.button_delete}"
																actionListener="#{customerBean.deleteTelephone}">
																<f:param name="index" value="#{sta.index}"></f:param>
															</a4j:commandButton>
														</h:panelGroup>
															<rich:message for="telNbrInput" />
													</f:facet>
												</rich:list>
												<h:commandLink value="#{msg.label_customer_phone_add}">
													<a4j:actionListener listener="#{customerBean.addTelephone}">
													</a4j:actionListener>
													<f:ajax render="telList" execute="@form"></f:ajax>
												</h:commandLink>
											</h:panelGroup>
		
											<h:outputText value=""></h:outputText>
											<div class="spacer"></div>
		
											<h:outputText value="#{msg.label_customer_email}"></h:outputText>
											<h:panelGroup id="emailList">
												<rich:list type="definitions" var="emailVo"
													iterationStatusVar="sta"
													value="#{customerBean.customerVo.customerEmailList}"
													styleClass="rf-dlst-customer">
													<f:facet name="term">
														<h:panelGroup layout="block">
															<h:inputText id="emailInput" size="45"
																value="#{emailVo.email}"
																validatorMessage="Validation Error: Invalid email address"
																maxlength="120">
		
																<f:validateRegex
																	pattern="^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+([;.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*$"></f:validateRegex>
																<rich:validator />
															</h:inputText>
															<h:outputLabel value="#{msg.label_category} " styleClass="space-left"></h:outputLabel>
															<h:selectOneMenu value="#{emailVo.typeCde}">
																<f:selectItem itemLabel="" itemValue=""></f:selectItem>
																<f:selectItem itemLabel="#{msg.label_contact_type_c}"
																	itemValue="C"></f:selectItem>
																<f:selectItem itemLabel="#{msg.label_contact_type_o}"
																	itemValue="H"></f:selectItem>
															</h:selectOneMenu>
															<a4j:commandButton styleClass="space-left"
																render="emailList" value="#{msg.button_delete}"
																actionListener="#{customerBean.deleteEmail}">
																<f:param name="index" value="#{sta.index}"></f:param>
															</a4j:commandButton>
														</h:panelGroup>
														<rich:message for="emailInput" />
													</f:facet>
												</rich:list>
											</h:panelGroup>
		
											<h:outputText value=""></h:outputText>
											<h:commandLink value="#{msg.label_customer_email_add}">
												<a4j:actionListener listener="#{customerBean.addEmail}">
												</a4j:actionListener>
												<f:ajax render="emailList" execute="@form"></f:ajax>
											</h:commandLink>
		
		
											<h:outputText value=""></h:outputText>
											<div class="spacer"></div>
		
											<h:outputText value="#{msg.label_customer_address}"></h:outputText>
											<h:panelGroup id="addrList">
												<rich:list type="definitions" var="addressVo"
													iterationStatusVar="sta"
													value="#{customerBean.customerVo.customerAddressList}"
													styleClass="rf-dlst-customer">
													<f:facet name="term">
														<h:panelGrid columns="1">
															<h:panelGroup>
																<h:selectOneMenu id="countryId"
																	value="#{addressVo.countryId}"
																	valueChangeListener="#{addressVo.ctryValueChange}">
																	<f:selectItem itemLabel="" itemValue=""></f:selectItem>
																	<f:selectItems value="#{addressVo.ctryItems}"></f:selectItems>
																	<a4j:ajax event="valueChange"
																		render="provinceId cityPanel" execute="@this" />
																</h:selectOneMenu>
																<h:selectOneMenu id="provinceId"
																	value="#{addressVo.provinceId}"
																	valueChangeListener="#{addressVo.provinceValueChange}"
																	styleClass="space-left">
																	<f:selectItem itemLabel="" itemValue=""></f:selectItem>
																	<f:selectItems value="#{addressVo.provinceItems}"></f:selectItems>
																	<a4j:ajax event="valueChange" render="cityPanel"
																		execute="@this" />
																</h:selectOneMenu>
																<h:outputLabel value="#{msg.label_province}"></h:outputLabel>
		
																<h:selectOneMenu id="cityPanel" styleClass="space-left"
																	value="#{addressVo.placeId}">
																	<f:selectItem itemLabel="" itemValue=""></f:selectItem>
																	<f:selectItems value="#{addressVo.cityItems}"></f:selectItems>
																</h:selectOneMenu>
																<h:outputLabel value="#{msg.label_city}"></h:outputLabel>
		
																<h:outputLabel value="#{msg.label_category}" styleClass="space-left"></h:outputLabel>
																<h:selectOneMenu value="#{addressVo.typeCde}">
																	<f:selectItem itemLabel="" itemValue=""></f:selectItem>
																	<f:selectItem itemLabel="#{msg.label_contact_type_c}"
																		itemValue="C"></f:selectItem>
																	<f:selectItem itemLabel="#{msg.label_contact_type_h}"
																		itemValue="H"></f:selectItem>
																	<f:selectItem itemLabel="#{msg.label_contact_type_o}"
																		itemValue="O"></f:selectItem>
																</h:selectOneMenu>
															</h:panelGroup>
		
															<h:panelGroup>
																<h:outputText value=""></h:outputText>
																<h:inputText size="45" value="#{addressVo.addr1}"
																	maxlength="200"></h:inputText>
															</h:panelGroup>
		
															<h:panelGroup>
																<h:outputText value=""></h:outputText>
																<h:inputText size="45" value="#{addressVo.addr2}"
																	maxlength="200"></h:inputText>
															</h:panelGroup>
		
															<h:panelGroup>
																<h:outputText value=""></h:outputText>
																<h:inputText size="45" value="#{addressVo.addr3}"
																	maxlength="200"></h:inputText>
															</h:panelGroup>
		
															<h:panelGroup>
																<h:inputText size="20" value="#{addressVo.dstrt}"
																	maxlength="50"></h:inputText>
																<h:outputLabel value="#{msg.label_customer_address_area}"></h:outputLabel>
																<h:inputText size="20" value="#{addressVo.zip}"
																id="zipInput" 
														validatorMessage="Validation Error: Invalid zip"
																	maxlength="50">
																		<f:validateRegex
															pattern="^[1-9][0-9]{5}$"></f:validateRegex>
														<rich:validator />
																	</h:inputText>
																<h:outputLabel
																	value="#{msg.label_customer_address_zip_code}"></h:outputLabel>
		
																<a4j:commandButton styleClass="space-left"
																	render="addrList" value="#{msg.button_delete}"
																	actionListener="#{customerBean.deleteAddress}">
																	<f:param name="index" value="#{sta.index}"></f:param>
																</a4j:commandButton>
															</h:panelGroup>
																<rich:message for="zipInput"></rich:message>
															<h:panelGroup>
																<h:outputText size="20" maxlength="50"></h:outputText>
																<h:outputText size="20" maxlength="50"></h:outputText>
															</h:panelGroup>
		
														</h:panelGrid>
		
													</f:facet>
												</rich:list>
											</h:panelGroup>
		
											<h:outputText value=""></h:outputText>
											<h:commandLink value="#{msg.label_customer_address_add}">
												<a4j:actionListener listener="#{customerBean.addAddress}">
												</a4j:actionListener>
												<f:ajax render="addrList" execute="@form"></f:ajax>
											</h:commandLink>
		
											<h:outputText value=""></h:outputText>
											<div class="spacer"></div>
		
											<h:outputText value="#{msg.label_customer_rmk_1}"></h:outputText>
											<h:inputText size="45" maxlength="100"
												value="#{customerBean.customerVo.remark1}"></h:inputText>
		
		
											<h:outputText value="#{msg.label_customer_rmk_2}"></h:outputText>
											<h:inputText size="45" maxlength="100"
												value="#{customerBean.customerVo.remark2}"></h:inputText>
		
											<h:outputText value="#{msg.label_customer_contact}"></h:outputText>
											<h:panelGroup>
												<h:selectBooleanCheckbox>
												</h:selectBooleanCheckbox>
												<h:outputLabel value="#{msg.label_customer_contact_mail}"></h:outputLabel>
												<h:selectBooleanCheckbox>
												</h:selectBooleanCheckbox>
												<h:outputLabel value="#{msg.label_customer_contact_email}"></h:outputLabel>
												<h:selectBooleanCheckbox>
												</h:selectBooleanCheckbox>
												<h:outputLabel value="#{msg.label_customer_contact_sms}"></h:outputLabel>
												<h:selectBooleanCheckbox>
												</h:selectBooleanCheckbox>
												<h:outputLabel value="#{msg.label_customer_contact_phone}"></h:outputLabel>
											</h:panelGroup>
		
										</h:panelGrid>
									</rich:tab>
		
		
		
									<rich:tab id="customerTabAttrId"
										header="#{msg.label_tab_attr_info}">
		
										<rich:dataTable id="customerAttributeTableId"
											value="#{customerBean.customerVo.customerAttributeList}"
											var="attributeVo" iterationStatusVar="sta"
											rendered="#{customerBean.customerVo.customerAttributeList.size()>0}">
											<f:facet name="header">
												<rich:columnGroup>
													<rich:column>
														<h:outputText value=""></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value="#{msg.label_addition_category}"></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value="#{msg.label_addition_value}"></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value="#{msg.label_addition_rmk_1}"></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value="#{msg.label_addition_rmk_2}"></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value=""></h:outputText>
													</rich:column>
												</rich:columnGroup>
											</f:facet>
		
											<rich:columnGroup>
												<rich:column>
													<h:outputText value="#{sta.count}"></h:outputText>
												</rich:column>
												<rich:column>
													<h:selectOneMenu value="#{attributeVo.attrCde}"
														>
														<f:selectItem itemLabel="" itemValue=""></f:selectItem>
														<f:selectItems value="#{customerBean.attrCodeItems}"></f:selectItems>
													</h:selectOneMenu>
												</rich:column>
												<rich:column>
													<h:inputText size="16" value="#{attributeVo.attrVal}"
													validatorMessage="Validation Error: Invalid zip" id="attrValInput"
														maxlength="80" >
															<f:validateRegex
															pattern="([0-9])*"></f:validateRegex>
														<rich:validator />
														</h:inputText>
														<rich:message for="attrValInput"></rich:message>
												</rich:column>
												<rich:column>
													<h:inputText size="25" value="#{attributeVo.remark1}"
														maxlength="150" ></h:inputText>
												</rich:column>
												<rich:column>
													<h:inputText size="25" value="#{attributeVo.remark1}"
														maxlength="100" ></h:inputText>
												</rich:column>
												<rich:column>
													<a4j:commandButton
														actionListener="#{customerBean.deleteAttribute}"
														render="customerTabAttrId" value="#{msg.button_delete}">
														<f:param name="attributeIndex" value="#{sta.index}"></f:param>
													</a4j:commandButton>
												</rich:column>
											</rich:columnGroup>
										</rich:dataTable>
		
										<a4j:commandLink
											actionListener="#{customerBean.addAttribute}"
											render="customerTabAttrId" value="#{msg.label_addition_add}">
										</a4j:commandLink>
		
		
									</rich:tab>
		
									<rich:tab id="customerTabDiscountId"
										header="#{msg.label_tab_discount}">
		
										<rich:dataTable id="customerDiscountTableId"
											value="#{customerBean.customerVo.customerDiscountList}"
											var="disccountVo" iterationStatusVar="sta"
											rendered="#{customerBean.customerVo.customerDiscountList.size()>0}">
											<f:facet name="header">
												<rich:columnGroup>
													<rich:column>
														<h:outputText value=""></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value="#{msg.label_discount_type}"></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value="#{msg.label_discount_date}"></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value="#{msg.label_discount_default_option}"></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value=""></h:outputText>
													</rich:column>
												</rich:columnGroup>
											</f:facet>
		
											<rich:columnGroup>
												<rich:column>
													<h:outputText value="#{sta.count}"></h:outputText>
												</rich:column>
												<rich:column>
													<h:selectOneMenu value="#{disccountVo.discCde}"
														>
														<f:selectItem itemLabel="" itemValue=""></f:selectItem>
														<f:selectItems value="#{customerBean.discountItems}"></f:selectItems>
													</h:selectOneMenu>
												</rich:column>
												<rich:column>
													<rich:calendar
														value="#{disccountVo.expiryDte}" datePattern="yyyy-MM-dd"></rich:calendar>
												</rich:column>
												<rich:column>
													<h:selectOneMenu
														value="#{disccountVo.defltInd}">
														<f:selectItem itemLabel="" itemValue=""></f:selectItem>
														<f:selectItem itemLabel="#{msg.label_yes}" itemValue="Y"></f:selectItem>
														<f:selectItem itemLabel="#{msg.label_no}" itemValue="N"></f:selectItem>
													</h:selectOneMenu>
												</rich:column>
												<rich:column>
													<a4j:commandButton
														actionListener="#{customerBean.deleteDiscount}"
														render="customerTabDiscountId" value="#{msg.button_delete}">
														<f:param name="attributeIndex" value="#{sta.index}"></f:param>
													</a4j:commandButton>
												</rich:column>
											</rich:columnGroup>
										</rich:dataTable>
		
										<a4j:commandLink
											actionListener="#{customerBean.addDiscount}"
											render="customerTabDiscountId"
											value="#{msg.label_discount_add}">
										</a4j:commandLink>
		
		
									</rich:tab>
		
									<rich:tab id="customerTabServiceId"
										header="#{msg.label_tab_customer_service}">
		
										<rich:dataTable id="customerServiceTableId"
											value="#{customerBean.customerVo.customerServiceEventList}"
											var="serviceEventVo" iterationStatusVar="sta"
											rendered="#{customerBean.customerVo.customerServiceEventList.size()>0}">
											<f:facet name="header">
												<rich:columnGroup>
													<rich:column>
														<h:outputText value=""></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value="#{msg.label_service_type}"></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value="#{msg.label_service_desc}"></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value="#{msg.label_service_date}"></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value="#{msg.label_service_rmk_1}"></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value="#{msg.label_service_rmk_2}"></h:outputText>
													</rich:column>
													<rich:column>
														<h:outputText value=""></h:outputText>
													</rich:column>
												</rich:columnGroup>
											</f:facet>
		
											<rich:columnGroup>
												<rich:column>
													<h:outputText value="#{sta.count}"></h:outputText>
												</rich:column>
												<rich:column>
													<h:selectOneMenu value="#{serviceEventVo.eventCde}"
														>
														<f:selectItem itemLabel="" itemValue=""></f:selectItem>
														<f:selectItems value="#{customerBean.serviceItems}"></f:selectItems>
													</h:selectOneMenu>
												</rich:column>
												<rich:column>
													<h:inputText value="#{serviceEventVo.eventDesc}" maxlength="300"
														></h:inputText>
												</rich:column>
												<rich:column>
													<rich:calendar value="#{serviceEventVo.eventDte}"
														datePattern="yyyy-MM-dd" ></rich:calendar>
												</rich:column>
												<rich:column>
													<h:inputText size="25" value="#{serviceEventVo.remark1}"
														maxlength="100" ></h:inputText>
												</rich:column>
												<rich:column>
													<h:inputText size="25" value="#{serviceEventVo.remark1}"
														maxlength="100" ></h:inputText>
												</rich:column>
												<rich:column>
													<a4j:commandButton
														actionListener="#{customerBean.deleteServiceEvent}"
														render="customerTabServiceId" value="#{msg.button_delete}">
														<f:param name="attributeIndex" value="#{sta.index}"></f:param>
													</a4j:commandButton>
												</rich:column>
											</rich:columnGroup>
										</rich:dataTable>
		
										<a4j:commandLink 
											actionListener="#{customerBean.addServiceEvent}"
											render="customerTabServiceId" value="#{msg.label_service_add}">
										</a4j:commandLink>
		
									</rich:tab>
		
									<rich:tab id="customerTabTranRecordId" 
										header="#{msg.label_tab_transaction_record}">
									</rich:tab>
		
									<rich:tab id="customerTabModifyRecordId" 
										header="#{msg.label_tab_modify_record}">
									</rich:tab>
		
		
								</rich:tabPanel>
		
								<h:panelGroup styleClass="customer-oper-button">
									
									<h:commandButton id="button_save_id" actionListener="#{customerBean.saveCustomer}"
										value="#{msg.button_save}"
										onclick="allowRedirect(); javascript:if(window.confirm('#{info.msg_make_sure_to_save}')) return true; else return false;"></h:commandButton>
									<h:commandButton id="button_cancel_id" actionListener="#{customerBean.cancelCustomer}"
										value="#{msg.button_cancel}" immediate="true"
										onclick="allowRedirect();javascript:if (window.confirm('#{info.msg_make_sure_to_cancel}')) return true; else return false;"></h:commandButton>
								</h:panelGroup>
							</h:panelGrid>
		
		
						</rich:panel>
		
		
		
					</h:form>
				</div>
			</div>
		</ui:define>
	</ui:composition>

</html>